package com.sdonkey.score.model;

import org.apache.commons.lang.StringUtils;

public class AdPlacementLimitListBean {

	/**
	 *
	 */
	private static final long serialVersionUID = -633136549338590823L;

	private String id;

	private String adId;

	private String adName;

	private String advertiserCode;

	private String startTime;

	private String endTime;

	private  String adType;

	private String terminalinfo;

	private String consumeAmount;
	//广告图片路径
	private String adHomepage;
	//广告预览路径(pad)
	private String padVersionUrl;
	//广告载体
	private String terminalType;
	//广告预览路径(pc)
	private String pcVersionUrl;
	//广告预览路径(mobile)
	private String mobileVersionUrl;
	//广告预览路径(tv)
	private String tvVersionUrl;
	//广告投放剩下的钱那
	private Double deliveryRemainingAmount;
	//是否可投放
	private String adStatus;
	//投放状态
	private String status;

	//是否被投诉
	private String putStatus;

	//当前广告余额
	private String advertiserBalance;

	//单价（渠道）
	private String channelPrice;

	private String limitStatus;

	private Integer billingTimes;
	private Integer viewTimes;

	public Integer getBillingTimes() {
		return billingTimes;
	}

	public void setBillingTimes(Integer billingTimes) {
		this.billingTimes = billingTimes;
	}

	public Integer getViewTimes() {
		return viewTimes;
	}

	public void setViewTimes(Integer viewTimes) {
		this.viewTimes = viewTimes;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getLimitStatus() {
		return limitStatus;
	}

	public void setLimitStatus(String limitStatus) {
		this.limitStatus = limitStatus;
	}

	public String getChannelPrice() {
		return channelPrice;
	}

	public void setChannelPrice(String channelPrice) {
		this.channelPrice = channelPrice;
	}

	public String getPutStatus() {
		return putStatus;
	}

	public void setPutStatus(String putStatus) {
		this.putStatus = putStatus;
	}

	public String getAdvertiserBalance() {
		return advertiserBalance;
	}

	public void setAdvertiserBalance(String advertiserBalance) {
		this.advertiserBalance = advertiserBalance;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAdId() {
		return adId;
	}

	public void setAdId(String adId) {
		this.adId = adId;
	}

	public String getConsumeAmount() {
		return consumeAmount;
	}

	public void setConsumeAmount(String consumeAmount) {
		this.consumeAmount = consumeAmount;
	}

	public String getAdName() {
		return adName;
	}

	public void setAdName(String adName) {
		this.adName = adName;
	}

	public String getAdType() {
		return adType;
	}

	public void setAdType(String adType) {
		this.adType = adType;
	}

	public Double getDeliveryRemainingAmount() {
		return deliveryRemainingAmount;
	}

	public void setDeliveryRemainingAmount(Double deliveryRemainingAmount) {
		this.deliveryRemainingAmount = deliveryRemainingAmount;
	}

	public String getAdStatus() {
		return adStatus;
	}

	public void setAdStatus(String adStatus) {
		this.adStatus = adStatus;
	}

	public String getTerminalinfo() {
		return terminalinfo;
	}

	public void setTerminalinfo(String terminalinfo) {
		this.terminalinfo = terminalinfo;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getAdvertiserCode() {
		return advertiserCode;
	}

	public void setAdvertiserCode(String advertiserCode) {
		this.advertiserCode = advertiserCode;
	}

	public String getPadVersionUrl() {
		return padVersionUrl;
	}

	public void setPadVersionUrl(String padVersionUrl) {
		this.padVersionUrl = padVersionUrl;
	}

	public String getAdHomepage() {
		return adHomepage;
	}

	public void setAdHomepage(String adHomepage) {
		this.adHomepage = adHomepage;
	}

	public String getTerminalType() {
		return terminalType;
	}

	public void setTerminalType(String terminalType) {
		this.terminalType = terminalType;
	}

	public String getPcVersionUrl() {
		return pcVersionUrl;
	}

	public void setPcVersionUrl(String pcVersionUrl) {
		this.pcVersionUrl = pcVersionUrl;
	}

	public String getMobileVersionUrl() {
		return mobileVersionUrl;
	}

	public void setMobileVersionUrl(String mobileVersionUrl) {
		this.mobileVersionUrl = mobileVersionUrl;
	}

	public String getTvVersionUrl() {
		return tvVersionUrl;
	}

	public void setTvVersionUrl(String tvVersionUrl) {
		this.tvVersionUrl = tvVersionUrl;
	}

	public String terminalTypeShow(){
		String terminalType= "";
		if(StringUtils.isNotBlank(this.terminalinfo)){
			String[] keys = this.terminalinfo.split("\\|");
			int length = keys.length;
			if(StringUtils.isNotBlank(keys[0])){
				terminalType += "手机";
			}

			if(length > 1 && StringUtils.isNotBlank(keys[1] )){
				terminalType += " PC";
			}

			if(length > 2 && StringUtils.isNotBlank(keys[2] )){
				terminalType += " PAD";
			}

			if(length > 3 && StringUtils.isNotBlank(keys[3] )){
				terminalType += " TV";
			}
		}
		return terminalType;
	}

	public String  statusShow(){
		String statusShow = "";
		if("-1".equals(this.status)){
			statusShow="审核未通过";
		}else if("0".equals(this.status)){
			statusShow="审核中";
		}else if("1".equals(this.status)){
			statusShow="审核通过";
		}else if("2".equals(this.status)){
			statusShow="投放中";
		}else if("3".equals(this.status)){
			statusShow="暂停投放";
		}else if("4".equals(this.status)){
			statusShow="投放结束";
		}
		return statusShow;
	}

	public String  adTypeShow(){
		String adTypeShow = "";
		if("video".equals(this.adType)){
			adTypeShow="视频";
		} else if("picture".equals(this.adType)){
			adTypeShow="图片";

		}
		return adTypeShow;
	}
	@Override
	public String toString() {
		return "FinishPlacementAdBean [id=" + id + ", adId=" + adId + ", adName=" + adName + ", advertiserCode="
				+ advertiserCode + ", startTime=" + startTime + ", endTime=" + endTime + ", adType=" + adType
				+ ", terminalinfo=" + terminalinfo + ", consumeAmount=" + consumeAmount + ", status=" + status
				+ ", putStatus=" + putStatus + "]";
	}

}
